<?php
namespace App\Dao;

class DataLostTable extends \Lavender\Dao\Table
{
    protected $database = "default";
    protected $table = "data_lost";
    
    CONST STATE_WRONG = 1;
    CONST STATE_REPEAR= 2;
    //记录
    public static function log($code,$date,$lost_num,$time=null)
    {
        if(empty($time)) 
        {
            $time =time();
        }
        self::instance()->add(null, [
            'code'=>$code,
            'day'=>$date,
            'state'=>self::STATE_WRONG,
            'lost_num'=>intval($lost_num),
            'created'=>$time,
        ]);
    }
    
    //修复
    public static function repair($code,$date,$lost_num,$time=null)
    {
        
    }
}

?>